//
//  orderView.m
//  spotrs
//
//  Created by xu on 16/5/16.
//  Copyright © 2016年 TZ. All rights reserved.
//

#import "orderView.h"

@implementation orderView

-(id)initWithFrame:(CGRect)frame array:(NSString *)array;
{
    self = [super initWithFrame:frame];
    if (self)
    {
        _dataArry = array;
      [self creatView];
    }
    return self;
}
-(void)creatView
{
    _mainTable = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT-navagationgHright-toolbarHright) style:UITableViewStylePlain];
    [_mainTable setBackgroundColor:[UIColor redColor]];
    [_mainTable setSeparatorStyle:UITableViewCellSeparatorStyleSingleLineEtched];
    [_mainTable setDelegate:self];
    [_mainTable setDataSource:self];
    [self addSubview:_mainTable];
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return 10;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"lunbo"];
    UIImageView *image = [[UIImageView alloc] init];
    if (!cell) {
        cell = [[UITableViewCell alloc] initWithStyle: UITableViewCellStyleDefault reuseIdentifier:@"lunbo"];
        [cell setSelectionStyle:UITableViewCellSelectionStyleNone];
        [image setFrame:CGRectMake(15, 10, SCREEN_WIDTH-30, 100)];
        [image setBackgroundColor:[UIColor redColor]];
        image.layer.masksToBounds = YES;
        image.layer.cornerRadius = 5;
        [cell addSubview:image];
    }
    else
    {
    
    }
    return cell;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    return 110;
}
@end
